﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VSTalk.Tools
{
    public class DelegateComparer<T> : IComparer<T>
    {
        private Func<T, T, int> _comp;
        public DelegateComparer(Func<T, T, int> comp)
        {
            _comp = comp;
        }

        public int Compare(T x, T y)
        {
            return _comp(x, y);
        }
    }
}
